﻿<div ng-controller="topicController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li class="active">专题列表</li>
            </ol>
        </div>
    </div>
    <div class="row ui-box">
        <div class="col-md-8">
            <a class="btn btn-primary btn-sm" ui-sref="app.product.topic_detail({action:'add'})"><i class="fa fa-plus"></i> 添加</a>
        </div>
    </div>
    <table class="table table-hover m-t-md">
        <thead>
            <tr>
                <th width="100">专题标题</th>
                <th width="100">展示图片</th>
                <th width="100">展示方式</th>
                <th width="100">广告图片</th>
                <th width="100">创建时间</th>
                <th width="160">操作</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="item in list.rows">
                <td>{{item.title}}</td>
                <td><img class="media-object img-thumbnail" ng-src="{{siteImg+item.show_images}}" width="92" height="67" /></td>
                <td>{{get_show_type(item.show_type)}}</td>
                <td><img class="media-object img-thumbnail" ng-src="{{siteImg+item.banner}}" width="92" height="67" /></td>
                <td>{{item.create_time}}</td>
                <td>
                    <a class="btn btn-primary btn-xs" ui-sref="app.product.topic_detail({id:{{item.id}}})">编辑</a>
                    <a class="btn btn-primary btn-xs" ng-click="remove(item.id)">删除</a>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="row">
        <div class="col-md-12">
            <uib-pagination total-items="list.total_result" items-per-page="list.size" ng-model="list.page" num-pages="list.total_pages"
                            ng-change="search_page(list.page)" class="pagination-sm" boundary-links="true" boundary-link-numbers="true" max-size="20"
                            previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
            <span class="pull-right" style="margin: 30px 0px 20px 0px">共{{list.total_result}} 当前：{{list.page}}/{{list.total_pages}}</span>
        </div>
    </div>
</div>